using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._EditingTools._Conflation
{
    /// <summary>
    /// <para>Edgematch Features</para>
    /// <para>Modifies input line features by spatially adjusting their shapes, guided by the specified edgematch links, so they become connected with the lines in the adjacent dataset.</para>
    /// <para>通过在指定边匹配链接的引导下对输入线要素进行空间调整其形状来修改输入线要素，使其与相邻数据集中的线相连。</para>
    /// </summary>    
    [DisplayName("Edgematch Features")]
    public class EdgematchFeatures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EdgematchFeatures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>Input line features to be adjusted.</para>
        /// <para>要调整的输入线特征。</para>
        /// </param>
        /// <param name="_in_link_features">
        /// <para>Input Link Features</para>
        /// <para>Input line features representing edgematch links.</para>
        /// <para>表示边匹配链接的输入线要素。</para>
        /// </param>
        public EdgematchFeatures(object _in_features, object _in_link_features)
        {
            this._in_features = _in_features;
            this._in_link_features = _in_link_features;
        }
        public override string ToolboxName => "Editing Tools";

        public override string ToolName => "Edgematch Features";

        public override string CallName => "edit.EdgematchFeatures";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _in_link_features, _method.GetGPValue(), _adjacent_features, _border_features, _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>Input line features to be adjusted.</para>
        /// <para>要调整的输入线特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Input Link Features</para>
        /// <para>Input line features representing edgematch links.</para>
        /// <para>表示边匹配链接的输入线要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Link Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_link_features { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Edgematch method to be used to adjust either input features only or both input features and adjacent features to new connecting locations.</para>
        ///   <bulletList>
        ///     <bullet_item>Move endpoint—Moves the endpoint of a line to the new connecting location. This is the default.</bullet_item><para/>
        ///     <bullet_item>Add segment—Adds a straight segment at the end of a line so it ends at the new connecting location.</bullet_item><para/>
        ///     <bullet_item>Adjust vertices—Adjusts the endpoint of a line to the new connecting location. The remaining vertices are also adjusted so its positional changes are gradually reduced toward the opposite end of the line.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于仅调整输入要素或同时调整输入要素和相邻要素到新连接位置的 Edgematch 方法。</para>
        ///   <bulletList>
        ///     <bullet_item>移动端点 - 将线的端点移动到新的连接位置。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>添加线段 （Add segment） - 在线的末尾添加直线段，使其在新的连接位置结束。</bullet_item><para/>
        ///     <bullet_item>调整顶点 （Adjust vertices） - 将线的端点调整为新的连接位置。其余的顶点也会被调整，因此它的位置变化逐渐减少到线的另一端。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._MOVE_ENDPOINT;

        public enum _method_value
        {
            /// <summary>
            /// <para>Move endpoint</para>
            /// <para>Move endpoint—Moves the endpoint of a line to the new connecting location. This is the default.</para>
            /// <para>移动端点 - 将线的端点移动到新的连接位置。这是默认设置。</para>
            /// </summary>
            [Description("Move endpoint")]
            [GPEnumValue("MOVE_ENDPOINT")]
            _MOVE_ENDPOINT,

            /// <summary>
            /// <para>Add segment</para>
            /// <para>Add segment—Adds a straight segment at the end of a line so it ends at the new connecting location.</para>
            /// <para>添加线段 （Add segment） - 在线的末尾添加直线段，使其在新的连接位置结束。</para>
            /// </summary>
            [Description("Add segment")]
            [GPEnumValue("ADD_SEGMENT")]
            _ADD_SEGMENT,

            /// <summary>
            /// <para>Adjust vertices</para>
            /// <para>Adjust vertices—Adjusts the endpoint of a line to the new connecting location. The remaining vertices are also adjusted so its positional changes are gradually reduced toward the opposite end of the line.</para>
            /// <para>调整顶点 （Adjust vertices） - 将线的端点调整为新的连接位置。其余的顶点也会被调整，因此它的位置变化逐渐减少到线的另一端。</para>
            /// </summary>
            [Description("Adjust vertices")]
            [GPEnumValue("ADJUST_VERTICES")]
            _ADJUST_VERTICES,

        }

        /// <summary>
        /// <para>Adjacent Features</para>
        /// <para>Line features that are adjacent to input features. If specified, both the input and adjacent features are adjusted to meet at new connecting locations, either the midpoints of the edgematch links or locations nearest to the midpoints of the links on the border features (if specified).</para>
        /// <para>与输入要素相邻的线要素。如果指定，则将调整输入要素和相邻要素，使其在新的连接位置相交，即边匹配链路的中点或最接近边界要素上链路中点的位置（如果指定）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Adjacent Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _adjacent_features { get; set; } = null;


        /// <summary>
        /// <para>Border Features</para>
        /// <para>Line or polygon features representing borders between the input and adjacent features. When you specify border features, both input and adjacent features are adjusted to meet at new connecting locations nearest to the midpoints of the links on the border features.</para>
        /// <para>表示输入要素和相邻要素之间边界的线或面要素。指定边界要素时，输入要素和相邻要素都将进行调整，以在最靠近边界要素上链接中点的新连接位置相交。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Border Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _border_features { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public EdgematchFeatures SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}